<!DOCTYPE HTML>
<html>
<body onload="startTest()">
  <svg width="400" height="400" xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <svg id="inner" width="300" height="300">
      <rect id="rect" width="100" height="100" fill="green">
        <animate attributeName="x" from="0" to="300" begin="0s" dur="10s"/>
        <discard xlink:href="#inner" begin="0s"/>
      </rect>
    </svg>
  </svg>
  <script>
    function startTest() {
      if (window.testRunner)
        testRunner.waitUntilDone();
      setTimeout(function() {
        document.write('PASS: Test did not crash.');
        if (window.testRunner) {
          testRunner.dumpAsText();
          testRunner.notifyDone();
        }
      }, 10);
    }
  </script>
</body>
</html>
